package com.xbongbong.saas.model;

import com.xbongbong.paas.domain.entity.PaasFormSubDataEntity;
import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.pro.domain.entity.UpdateDataEntity;
import com.xbongbong.saas.domain.entity.OtherExpenseSubDataEntity;
import org.elasticsearch.action.support.WriteRequest;

import java.util.List;
import java.util.Map;


/**
 * @author bomfish
 */
public interface OtherExpenseSubDataModel extends IModel<OtherExpenseSubDataEntity> {
   @Override
   Integer insert(OtherExpenseSubDataEntity entity) throws XbbException;

   @Override
   Integer update(OtherExpenseSubDataEntity entity) throws XbbException;

   @Override
   List<OtherExpenseSubDataEntity> findEntitys(Map<String, Object> param);

   @Override
   Integer getEntitysCount(Map<String, Object> param);

   Integer insertBatch(List<OtherExpenseSubDataEntity> entities) throws XbbException;

   List<OtherExpenseSubDataEntity> getByDataId(Long dataId, String corpid);

   List<OtherExpenseSubDataEntity> getByDataIds(List<Long> dataIds, String corpid, DelEnum delEnum);

   Integer updateBatch(List<UpdateDataEntity> updateDataList, String corpid) throws XbbException;

   Integer deleteBatch(String corpid, List<OtherExpenseSubDataEntity> entities, WriteRequest.RefreshPolicy refreshPolicy) throws XbbException;


   Integer deleteByDataId(Long dataId, String corpid) throws XbbException;

   Integer deleteBatchByDataId(List<Long> dataIds, String corpid, DelEnum delEnum) throws XbbException;

   void restoreBatch(List<Long> dataIds, String corpid) throws XbbException;

    Integer updateDel(List<OtherExpenseSubDataEntity> updateDelList, String corpid, WriteRequest.RefreshPolicy refreshPolicy, DelEnum delEnum) throws XbbException;

    Integer updateBatchByEntity(List<? extends PaasFormSubDataEntity> list, String corpid) throws XbbException;
}
